/*
package com.kl.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;

import javax.annotation.Resource;

*/
/**
     * @author yeyuting
     * @create 2021/2/19
     *//*

@Configuration
public class RedisConfig {

        @Bean
        public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
            RedisTemplate<String, Object> template = new RedisTemplate<>();
            RedisSerializer<String> redisSerializer = new StringRedisSerializer();
            template.setConnectionFactory(factory);
            //key序列化方式
            //template.setKeySerializer(redisSerializer);
            //value序列化
            template.setValueSerializer(new StringRedisSerializer());
            //value hashmap序列化
            template.setHashValueSerializer(redisSerializer);
            return template;
        }
}

*/
